class Solution {

public:
    void quilkSort(vector<int>& nums, int start,int en )
    {
        if(start>en)
            return;
        int left=start,right=en;
        int tmp=nums[start];
        while(left<right)
        {
            while(right>left && nums[right]>=tmp)
                right--;
            nums[left]=nums[right];
            while(left<right && nums[left]<=tmp)
                left++;
            nums[right]=nums[left];
        }
        nums[left]=tmp;
        quilkSort(nums,start,left-1);
        quilkSort(nums,left+1,en);

    }
    void sortColors(vector<int>& nums) {
        quilkSort(nums,0,nums.size()-1);
    }
};
